import { createStore } from 'vuex'


//用户操作
const userOptions = {
    namespaced: true,
    state: {
        userAvatarPath: "",
        user: {}
    },
    mutations: {
        saveUserAvatarPath(state, userAvatarPath) {
            state.userAvatarPath = userAvatarPath
        },
        saveUserData(state,user){
            state.user=user;
        }
    },
    actions: {},
    getters: {}
}



//创建并暴露store
export default createStore({
    modules: {
        user: userOptions,
    }
})


